/*
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2, or (at your option)
 * any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 * 02111-1307, USA.
 *
 * http://www.gnu.org/copyleft/gpl.html
 */
package l1j.server.server.model;

import java.util.ArrayList;

import l1j.server.server.utils.ListMapUtil;

/**玩家斷絕清單(聊天黑名單)**/
public class L1ExcludingList {

	private final ArrayList<Integer>_idList = new ArrayList<Integer>();

	/***新增對象ID至阻斷清單中*/
	public void add(final int chaid) {
		this._idList.add(chaid);
	}

	/**將此ID從阻斷清單中移除**/
	public int remove(final int chaid){
		if(this._idList.contains(chaid)){
			return chaid;
		}
		return 0;
	}

	/**是否在阻斷清單內**/
	public boolean contains(final int chaid){
		return this._idList.contains(chaid);
	}
	/**阻斷清單是否額滿(16人)**/
	public boolean isFull(){
		return this._idList.size() >=16 ? true : false;
	}
	
	public void clear(){
		ListMapUtil.clear(this._idList);
	}

}
